{#
This file is part of EC-CUBE

Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved.

http://www.ec-cube.co.jp/

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
#}
{% extends 'default_frame.twig' %}

{% set menus = ['store', 'plugin', 'plugin_owners_install'] %}

{% block title %}オーナーズストア{% endblock %}
{% block sub_title %}購入済プラグイン{% endblock %}

{% block javascript %}
<script src="{{ app.config.admin_urlpath }}/assets/js/vendor/masonry.pkgd.min.js"></script>
<script>
$(function() {
    $('.grid').masonry({
        itemSelector: '.grid-item',
        columnWidth: '.grid-item'
    });
});
</script>
{% endblock javascript %}

{% block main %}
<div class="row">
    <div class="col-md-12">
        <div class="box">
            <div class="box-header">
                <h3 class="box-title">プラグイン一覧</h3>
            </div><!-- /.box-header -->
            <div class="box-body">
                {% if authResult  %}
                    <div class="row">
                        <div class="col-xs-12">
                            {% if success == 1 %}
                                <div class="plugin-block">
                                    <div class="row">
                                        {% for item in promotionItems %}
                                            <div class="col-xs-12">
                                                {{ include('Store/plugin_owners_panel.twig') }}
                                            </div>
                                        {% endfor %}
                                    </div><!-- .row -->
                                    <div class="row grid">
                                        {% for item in items %}
                                            <div class="col-xs-12 col-md-6 grid-item">
                                                {{ include('Store/plugin_owners_panel.twig') }}
                                            </div>
                                        {% endfor %}
                                   </div><!-- .row -->
                                </div><!-- .plugin-block -->
                            {% else %}
                                <p class="text-danger">{{ message }}</p>
                            {% endif %}
                        </div><!-- .col-xs-12 -->
                    </div><!-- .row -->
                {% else %}
                    <p>
                        認証キーを設定してください。
                    </p>
                    <p>
                        <a href="{{ url('admin_store_authentication_setting') }}">認証キー設定画面へ</a>
                    </p>
                {% endif %}
            </div><!-- /.box-body -->
        </div><!-- /.box -->
    </div><!-- /.col -->
</div>

{% endblock %}